#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#define N 100010

int a[N];

int isP(int x)
{
    for (int i = 2; i <= x / i; ++i)
    {
        if (x % i == 0)return 0;
    }
    return 1;
}
int main()
{
    int n = 1999999874;
    //scanf("%d",&n);

    /*--------------------------------*/

    for (int i = 2; i <= n / i; ++i)
    {
        int idx = (n / i);
        if (n % i || a[idx])printf("%d\n", i);
        else a[idx] = 1;
    }

    /*--------------------------------*/

    for (int i = 2; i <= n / i; ++i)
        if (a[i] && isP(i))printf("%d", i > n / i ? i : n / i);

    return 0;
}